package Student.Demo01;

public class zuoye2 {
	public static void main(String[] args) {
		int[] a=new int[] {1,3,5,2,945,5};
		for(int i=0;i<a.length;i++) {
			for(int j=0;j<a.length-1-i;j++) {
				if(a[j]>a[j+1]) {
					int temp=a[j];
					a[j]=a[j+1];
					a[j+1]=temp;
				}
			}
			
		}
		for(int c=0;c<a.length;c++) {
			System.out.println(a[c]);
		}
		
		
	}
}
